#pragma once
#include "common.h"
#include "Model.h"
#include "DisplayManage.h"
#include "Widget.h"
#include "Container.h"

class DLL_EXP CBackGroundWidget : public CWidget
{
public:

	CBackGroundWidget(void){
		m_bBackGround=true;
	};
	virtual ~CBackGroundWidget(void){};

	virtual int GetRect(WRect* rc)
	{
		CWidget* pContainer=this->GetContainer();
		pContainer->GetViewPort(rc);
		return 0;
	}

	
	virtual void GetRectAsScreen(WRect* rcScreen)
	{
		GetRect(rcScreen);
		CWidget* pContainer=this->GetContainer();
		pContainer->ClientToScreen(rcScreen);
	}

	virtual int CustDraw(CFrameSurface* pSurface)
	{		
		WRect rcScreen;
		this->GetRectAsScreen(&rcScreen);
		pSurface->FillRect(&rcScreen,this->m_clrBackGround );

		return 0;
	}
};